home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AEMail 2.40
/
AEMail v2.40.iso
/
arexx
/
html2.aem
< prev
next >
Wrap
Text File
|
1999-12-15
|
2KB
|
102 lines
/* AEMail HTML display */
PARSE ARG file a
OPTIONS RESULTS
browlst = "IBROWSE2"'0A'X"IBROWSE1"'0A'X"AWEB3"
ADDRESS AEMAIL1 "getlistitem" '"'browlst'"' '"Select the browser you want"'
browser = result
IF browser = "" THEN EXIT
IF ~ SHOW('L', "rexxsupport.library") THEN DO
IF ~ ADDLIB('rexxsupport.library', 0, -30, 0) THEN
DO
ADDRESS AEMAIL1 okay1 "ARexx support library not available, exiting"
EXIT
END
END
IF (file = "") THEN DO
ADDRESS AEMAIL1 GETVAR
file = result
IF (SUBSTR(file, 1, 5) ~= 'http:') THEN DO
ADDRESS AEMAIL1 okay1 "Variable not web address"'0A'X"Found :" file
EXIT
END
END
wwwprog = ""
wwwport = ""
IF browser = "IBROWSE2" THEN
DO
wwwdir = "IBROWSE2:"
wwwprog = "IBROWSE2:Ibrowse"
wwwport = "IBROWSE"
END
ELSE IF browser = "IBROWSE1" THEN
DO
wwwdir = "IBROWSE1:"
wwwprog = "IBROWSE1:Ibrowse"
wwwport = "IBROWSE"
END
ELSE IF browser = "AWEB3" THEN
DO
wwwdir = "AWEB3:"
wwwprog = "AWeb3:Aweb-II"
wwwport = "AWEB."
END
ELSE
DO
ADDRESS AEMAIL1 OKAY1 "Invalid Browser: "browser
EXIT
END
IF (wwwport = "AWEB.") THEN
DO
ports = SHOW('P')
PARSE VAR ports dummy "AWEB." portnr .
IF (portnr = "") THEN portnr = "1"
wwwport = wwwport || portnr
END
IF ~ SHOW('P', wwwport) THEN
DO
ADDRESS COMMAND "Run >NIL: "||wwwprog
ADDRESS COMMAND "WaitForPort "||wwwport
IF ~ SHOW("P", wwwport) THEN
DO
ADDRESS COMMAND "Run >NIL: sys:utilities/multiview" file
EXIT
END
END
olddir = PRAGMA('D', wwwdir)
newdir = PRAGMA('D',"")
file2 = STRIP(file,'B','"')
IF (file2 == 'T:AMtemp') THEN DO
ADDRESS COMMAND "DELETE >NIL: t:amtemp.html"
ADDRESS COMMAND "RENAME >NIL: T:Amtemp t:amtemp.html"
file = "file://localhost/t:amtemp.html"
END
ADDRESS VALUE wwwport
IF (wwwport = "IBROWSE") THEN DO
"INFO SCREEN"
ADDRESS AEMAIL1 SCREENTOFRONT result
"GOTOURL" file
END
ELSE DO
"SCREENTOFRONT"
"OPEN" file
END
if (RC ~= 0) then ADDRESS AEMAIL1 okay1 "Your browser returned RC "RC